// -*- coding: utf-8 -*-
/*
author: zengbin93
email: zeng_bin8888@163.com
create_dt: 2022/12/16 19:37
describe: 交易员基础模块
*/

use crate::objects::{NewBar, Signal, Direction};
use std::collections::HashMap;

/// CZSC交易员基础类
pub struct CzscTrader {
    pub name: String,
    pub strategy_name: String,
    pub signals: HashMap<String, Signal>,
}

impl CzscTrader {
    /// 创建新的交易员
    pub fn new(name: &str, strategy_name: &str) -> Self {
        Self {
            name: name.to_string(),
            strategy_name: strategy_name.to_string(),
            signals: HashMap::new(),
        }
    }
    
    /// 更新信号
    pub fn update_signals(&mut self, signals: HashMap<String, Signal>) {
        self.signals = signals;
    }
    
    /// 获取当前信号
    pub fn get_signals(&self) -> &HashMap<String, Signal> {
        &self.signals
    }
} 